home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig10_01.jar / Ch10 / Fig10_01 / Commis1.h < prev    next >
C/C++ Source or Header  |  1997-10-28  |  662b  |  25 lines

  1. // Fig. 10.1: commis1.h
  2. // CommissionWorker class derived from Employee
  3. #ifndef COMMIS1_H
  4. #define COMMIS1_H
  5. #include "employ2.h"
  6.  
  7. class CommissionWorker : public Employee {
  8. public:
  9.    CommissionWorker( const char *, const char *,
  10.                      double = 0.0, double = 0.0,
  11.                      int = 0 );
  12.    void setSalary( double );
  13.    void setCommission( double );
  14.    void setQuantity( int );
  15.    virtual double earnings() const;
  16.    virtual void print() const;
  17. private:
  18.    double salary;       // base salary per week
  19.    double commission;   // amount per item sold
  20.    int quantity;        // total items sold for week
  21. };
  22.  
  23. #endif
  24.  
  25.